Closes #3112.
flag_message_format: MessageFormat,
flag_lib: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_example: Vec<String>,
+ flag_examples: bool,
flag_test: Vec<String>,
+ flag_tests: bool,
flag_bench: Vec<String>,
+ flag_benches: bool,
flag_frozen: bool,
flag_locked: bool,
arg_args: Vec<String>,
-h, --help Print this message
--lib Benchmark only this package's library
--bin NAME Benchmark only the specified binary
+ --bins Benchmark all binaries
--example NAME Benchmark only the specified example
+ --examples Benchmark all examples
--test NAME Benchmark only the specified test target
+ --tests Benchmark all tests
--bench NAME Benchmark only the specified bench target
+ --benches Benchmark all benches
--no-run Compile, but don't run benchmarks
-p SPEC, --package SPEC ... Package to run benchmarks for
-j N, --jobs N Number of parallel jobs, defaults to # of CPUs
release: true,
mode: ops::CompileMode::Bench,
filter: ops::CompileFilter::new(options.flag_lib,
- &options.flag_bin,
- &options.flag_test,
- &options.flag_example,
- &options.flag_bench),
+ &options.flag_bin, options.flag_bins,
+ &options.flag_test, options.flag_tests,
+ &options.flag_example, options.flag_examples,
+ &options.flag_bench, options.flag_benches,),
message_format: options.flag_message_format,
target_rustdoc_args: None,
target_rustc_args: None,
flag_release: bool,
flag_lib: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_example: Vec<String>,
+ flag_examples: bool,
flag_test: Vec<String>,
+ flag_tests: bool,
flag_bench: Vec<String>,
+ flag_benches: bool,
flag_locked: bool,
flag_frozen: bool,
flag_all: bool,
-j N, --jobs N Number of parallel jobs, defaults to # of CPUs
--lib Build only this package's library
--bin NAME Build only the specified binary
+ --bins Build all binaries
--example NAME Build only the specified example
+ --examples Build all examples
--test NAME Build only the specified test target
- --bench NAME Build only the specified benchmark target
+ --tests Build all tests
+ --bench NAME Build only the specified bench target
+ --benches Build all benches
--release Build artifacts in release mode, with optimizations
--features FEATURES Space-separated list of features to also build
--all-features Build all available features
mode: ops::CompileMode::Build,
release: options.flag_release,
filter: ops::CompileFilter::new(options.flag_lib,
- &options.flag_bin,
- &options.flag_test,
- &options.flag_example,
- &options.flag_bench),
+ &options.flag_bin, options.flag_bins,
+ &options.flag_test, options.flag_tests,
+ &options.flag_example, options.flag_examples,
+ &options.flag_bench, options.flag_benches,),
message_format: options.flag_message_format,
target_rustdoc_args: None,
target_rustc_args: None,
-j N, --jobs N Number of parallel jobs, defaults to # of CPUs
--lib Check only this package's library
--bin NAME Check only the specified binary
+ --bins Check all binaries
--example NAME Check only the specified example
+ --examples Check all examples
--test NAME Check only the specified test target
- --bench NAME Check only the specified benchmark target
+ --tests Check all tests
+ --bench NAME Check only the specified bench target
+ --benches Check all benches
--release Check artifacts in release mode, with optimizations
--features FEATURES Space-separated list of features to also check
--all-features Check all available features
flag_release: bool,
flag_lib: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_example: Vec<String>,
+ flag_examples: bool,
flag_test: Vec<String>,
+ flag_tests: bool,
flag_bench: Vec<String>,
+ flag_benches: bool,
flag_locked: bool,
flag_frozen: bool,
flag_all: bool,
mode: ops::CompileMode::Check,
release: options.flag_release,
filter: ops::CompileFilter::new(options.flag_lib,
- &options.flag_bin,
- &options.flag_test,
- &options.flag_example,
- &options.flag_bench),
+ &options.flag_bin, options.flag_bins,
+ &options.flag_test, options.flag_tests,
+ &options.flag_example, options.flag_examples,
+ &options.flag_bench, options.flag_benches,),
message_format: options.flag_message_format,
target_rustdoc_args: None,
target_rustc_args: None,
flag_package: Vec<String>,
flag_lib: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_frozen: bool,
flag_locked: bool,
flag_all: bool,
-j N, --jobs N Number of parallel jobs, defaults to # of CPUs
--lib Document only this package's library
--bin NAME Document only the specified binary
+ --bins Document all binaries
--release Build artifacts in release mode, with optimizations
--features FEATURES Space-separated list of features to also build
--all-features Build all available features
no_default_features: options.flag_no_default_features,
spec: spec,
filter: ops::CompileFilter::new(options.flag_lib,
- &options.flag_bin,
- &empty,
- &empty,
- &empty),
+ &options.flag_bin, options.flag_bins,
+ &empty, false,
+ &empty, false,
+ &empty, false),
message_format: options.flag_message_format,
release: options.flag_release,
mode: ops::CompileMode::Doc {
flag_no_default_features: bool,
flag_debug: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_example: Vec<String>,
+ flag_examples: bool,
flag_verbose: u32,
flag_quiet: Option<bool>,
flag_color: Option<String>,
--all-features Build all available features
--no-default-features Do not build the `default` feature
--debug Build in debug mode instead of release mode
- --bin NAME Only install the binary NAME
- --example EXAMPLE Install the example EXAMPLE instead of binaries
+ --bin NAME Install only the specified binary
+ --bins Install all binaries
+ --example NAME Install only the specified example
+ --examples Install all examples
--root DIR Directory to install packages into
-v, --verbose ... Use verbose output (-vv very verbose/build.rs output)
-q, --quiet Less output printed to stdout
spec: ops::Packages::Packages(&[]),
mode: ops::CompileMode::Build,
release: !options.flag_debug,
- filter: ops::CompileFilter::new(false, &options.flag_bin, &[],
- &options.flag_example, &[]),
+ filter: ops::CompileFilter::new(false,
+ &options.flag_bin, options.flag_bins,
+ &[], false,
+ &options.flag_example, options.flag_examples,
+ &[], false),
message_format: ops::MessageFormat::Human,
target_rustc_args: None,
target_rustdoc_args: None,
filter: if examples.is_empty() && bins.is_empty() {
ops::CompileFilter::Everything { required_features_filterable: false, }
} else {
- ops::CompileFilter::Only {
- lib: false, tests: &[], benches: &[],
- bins: &bins, examples: &examples,
- }
+ ops::CompileFilter::new(false,
+ &bins, false,
+ &[], false,
+ &examples, false,
+ &[], false)
},
message_format: options.flag_message_format,
target_rustdoc_args: None,
flag_release: bool,
flag_lib: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_example: Vec<String>,
+ flag_examples: bool,
flag_test: Vec<String>,
+ flag_tests: bool,
flag_bench: Vec<String>,
+ flag_benches: bool,
flag_profile: Option<String>,
flag_frozen: bool,
flag_locked: bool,
-j N, --jobs N Number of parallel jobs, defaults to # of CPUs
--lib Build only this package's library
--bin NAME Build only the specified binary
+ --bins Build all binaries
--example NAME Build only the specified example
+ --examples Build all examples
--test NAME Build only the specified test target
- --bench NAME Build only the specified benchmark target
+ --tests Build all tests
+ --bench NAME Build only the specified bench target
+ --benches Build all benches
--release Build artifacts in release mode, with optimizations
--profile PROFILE Profile to build the selected target for
--features FEATURES Features to compile for the package
mode: mode,
release: options.flag_release,
filter: ops::CompileFilter::new(options.flag_lib,
- &options.flag_bin,
- &options.flag_test,
- &options.flag_example,
- &options.flag_bench),
+ &options.flag_bin, options.flag_bins,
+ &options.flag_test, options.flag_tests,
+ &options.flag_example, options.flag_examples,
+ &options.flag_bench, options.flag_benches,),
message_format: options.flag_message_format,
target_rustdoc_args: None,
target_rustc_args: options.arg_opts.as_ref().map(|a| &a[..]),
flag_package: Option<String>,
flag_lib: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_example: Vec<String>,
+ flag_examples: bool,
flag_test: Vec<String>,
+ flag_tests: bool,
flag_bench: Vec<String>,
+ flag_benches: bool,
flag_frozen: bool,
flag_locked: bool,
}
-j N, --jobs N Number of parallel jobs, defaults to # of CPUs
--lib Build only this package's library
--bin NAME Build only the specified binary
+ --bins Build all binaries
--example NAME Build only the specified example
+ --examples Build all examples
--test NAME Build only the specified test target
- --bench NAME Build only the specified benchmark target
+ --tests Build all tests
+ --bench NAME Build only the specified bench target
+ --benches Build all benches
--release Build artifacts in release mode, with optimizations
--features FEATURES Space-separated list of features to also build
--all-features Build all available features
spec: Packages::Packages(&spec),
release: options.flag_release,
filter: ops::CompileFilter::new(options.flag_lib,
- &options.flag_bin,
- &options.flag_test,
- &options.flag_example,
- &options.flag_bench),
+ &options.flag_bin, options.flag_bins,
+ &options.flag_test, options.flag_tests,
+ &options.flag_example, options.flag_examples,
+ &options.flag_bench, options.flag_benches,),
message_format: options.flag_message_format,
mode: ops::CompileMode::Doc { deps: false },
target_rustdoc_args: Some(&options.arg_opts),
flag_lib: bool,
flag_doc: bool,
flag_bin: Vec<String>,
+ flag_bins: bool,
flag_example: Vec<String>,
+ flag_examples: bool,
flag_test: Vec<String>,
+ flag_tests: bool,
flag_bench: Vec<String>,
+ flag_benches: bool,
flag_verbose: u32,
flag_quiet: Option<bool>,
flag_color: Option<String>,
-h, --help Print this message
--lib Test only this package's library
--doc Test only this library's documentation
- --bin NAME ... Test only the specified binaries
+ --bin NAME ... Test only the specified binary
+ --bins Test all binaries
--example NAME ... Check that the specified examples compile
- --test NAME ... Test only the specified integration test targets
- --bench NAME ... Test only the specified benchmark targets
+ --examples Check that all examples compile
+ --test NAME ... Test only the specified test target
+ --tests Test all tests
+ --bench NAME ... Test only the specified bench target
+ --benches Test all benches
--no-run Compile, but don't run tests
-p SPEC, --package SPEC ... Package to run tests for
--all Test all packages in the workspace
let (mode, filter);
if options.flag_doc {
mode = ops::CompileMode::Doctest;
- filter = ops::CompileFilter::new(true, &empty, &empty, &empty, &empty);
+ filter = ops::CompileFilter::new(true, &empty, false, &empty, false,
+ &empty, false, &empty, false);
} else {
mode = ops::CompileMode::Test;
filter = ops::CompileFilter::new(options.flag_lib,
- &options.flag_bin,
- &options.flag_test,
- &options.flag_example,
- &options.flag_bench);
+ &options.flag_bin, options.flag_bins,
+ &options.flag_test, options.flag_tests,
+ &options.flag_example, options.flag_examples,
+ &options.flag_bench, options.flag_benches);
}
let spec = if options.flag_all {